Optimal. Leaf size=208 \[ -\frac {(5 A-2 B) \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{3 a^2 d (\sec (c+d x)+1)}+\frac {(4 A-B) \sin (c+d x) \sqrt {\sec (c+d x)}}{a^2 d}-\frac {(5 A-2 B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 a^2 d}-\frac {(4 A-B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^2 d}-\frac {(A-B) \sin (c+d x) \sec ^{\frac {5}{2}}(c+d x)}{3 d (a \sec (c+d x)+a)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.43, antiderivative size = 208, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {2960, 4019, 3787, 3771, 2641, 3768, 2639} \[ -\frac {(5 A-2 B) \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{3 a^2 d (\sec (c+d x)+1)}+\frac {(4 A-B) \sin (c+d x) \sqrt {\sec (c+d x)}}{a^2 d}-\frac {(5 A-2 B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 a^2 d}-\frac {(4 A-B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^2 d}-\frac {(A-B) \sin (c+d x) \sec ^{\frac {5}{2}}(c+d x)}{3 d (a \sec (c+d x)+a)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2639
Rule 2641
Rule 2960
Rule 3768
Rule 3771
Rule 3787
Rule 4019
Rubi steps
\begin {align*} \int \frac {(A+B \cos (c+d x)) \sec ^{\frac {3}{2}}(c+d x)}{(a+a \cos (c+d x))^2} \, dx &=\int \frac {\sec ^{\frac {5}{2}}(c+d x) (B+A \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx\\ &=-\frac {(A-B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}+\frac {\int \frac {\sec ^{\frac {3}{2}}(c+d x) \left (-\frac {3}{2} a (A-B)+\frac {1}{2} a (7 A-B) \sec (c+d x)\right )}{a+a \sec (c+d x)} \, dx}{3 a^2}\\ &=-\frac {(5 A-2 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac {(A-B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}+\frac {\int \sqrt {\sec (c+d x)} \left (-\frac {1}{2} a^2 (5 A-2 B)+\frac {3}{2} a^2 (4 A-B) \sec (c+d x)\right ) \, dx}{3 a^4}\\ &=-\frac {(5 A-2 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac {(A-B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {(5 A-2 B) \int \sqrt {\sec (c+d x)} \, dx}{6 a^2}+\frac {(4 A-B) \int \sec ^{\frac {3}{2}}(c+d x) \, dx}{2 a^2}\\ &=\frac {(4 A-B) \sqrt {\sec (c+d x)} \sin (c+d x)}{a^2 d}-\frac {(5 A-2 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac {(A-B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {(4 A-B) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx}{2 a^2}-\frac {\left ((5 A-2 B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{6 a^2}\\ &=-\frac {(5 A-2 B) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{3 a^2 d}+\frac {(4 A-B) \sqrt {\sec (c+d x)} \sin (c+d x)}{a^2 d}-\frac {(5 A-2 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac {(A-B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {\left ((4 A-B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx}{2 a^2}\\ &=-\frac {(4 A-B) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{a^2 d}-\frac {(5 A-2 B) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{3 a^2 d}+\frac {(4 A-B) \sqrt {\sec (c+d x)} \sin (c+d x)}{a^2 d}-\frac {(5 A-2 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac {(A-B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 3.21, size = 303, normalized size = 1.46 \[ -\frac {e^{-i d x} \cos \left (\frac {1}{2} (c+d x)\right ) \sqrt {\sec (c+d x)} \left (\cos \left (\frac {1}{2} (c+3 d x)\right )+i \sin \left (\frac {1}{2} (c+3 d x)\right )\right ) \left (-i (4 A-B) e^{-i (c+d x)} \sqrt {1+e^{2 i (c+d x)}} \left (1+e^{i (c+d x)}\right )^3 \, _2F_1\left (\frac {1}{2},\frac {3}{4};\frac {7}{4};-e^{2 i (c+d x)}\right )+2 i (25 A-7 B) \cos (c+d x)+8 (5 A-2 B) \cos ^3\left (\frac {1}{2} (c+d x)\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-i \sin \left (\frac {1}{2} (c+d x)\right )\right )-12 A \sin (c+d x)-7 A \sin (2 (c+d x))+17 i A \cos (2 (c+d x))+29 i A+B \sin (2 (c+d x))-5 i B \cos (2 (c+d x))-5 i B\right )}{6 a^2 d (\cos (c+d x)+1)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 1.34, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (B \cos \left (d x + c\right ) + A\right )} \sec \left (d x + c\right )^{\frac {3}{2}}}{a^{2} \cos \left (d x + c\right )^{2} + 2 \, a^{2} \cos \left (d x + c\right ) + a^{2}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \cos \left (d x + c\right ) + A\right )} \sec \left (d x + c\right )^{\frac {3}{2}}}{{\left (a \cos \left (d x + c\right ) + a\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 1.88, size = 494, normalized size = 2.38 \[ -\frac {2 \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \left (5 A \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-12 A \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-2 B \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+3 B \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \left (5 A \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-12 A \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-2 B \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+3 B \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-12 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \left (4 A -B \right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \left (43 A -10 B \right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \left (37 A -7 B \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {\left (A+B\,\cos \left (c+d\,x\right )\right )\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{3/2}}{{\left (a+a\,\cos \left (c+d\,x\right )\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________